﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class kecheng_shenhe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["sTittle"] = "机构专区>>课程审核";
            
            SqlDataSource1.SelectCommand = "SELECT [id], [name],[username1],[confirm] FROM [kecheng_laoshi] WHERE (([jigou] = '" + Session["sJigou"].ToString().Trim() +
              "') AND ([confirm] = '提交'))  ORDER BY [xtsj2] DESC";
        }
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.ToString() != "Select" & e.CommandName.ToString() != "Page" & e.CommandName.ToString() != "Sort")
        {
            string zid = e.CommandArgument.ToString();
            string zscript = "<script language=javascript> window.open('../mystudy/kecheng_play_temp.aspx?rid=" + zid + "','kecheng_test_window', 'height=768,width=1024,top=0,left=0,toolbar=no,resizable=yes,menubar=no,location=no,status=no')</script>";
            Response.Write(zscript);
        }
    }

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex != -1)
        {
            int id = e.Row.RowIndex + 1;
            e.Row.Cells[0].Text = id.ToString();
        }
    }

 
 
}
